const args = process.argv.splice(2);
const iconv = require('iconv-lite');
const { exec } = require('child_process');
const content = args[0].replace(/^thunder:\/\//g, '');
const result = new Buffer(content, 'base64').toString().replace(/^AA|ZZ$/g, '');
exec('clip').stdin.end(iconv.encode(result, 'gbk'));
console.log('已添加到粘贴板：' + result);